package com.soa.zuul.entity;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.Id;
import javax.persistence.Table;
import org.hibernate.annotations.GenericGenerator;

/**
 * GatewayUrlLimit entity. @author MyEclipse Persistence Tools
 */
@Entity
@Table(name = "gateway_url_limit", schema = "public")
public class GatewayUrlLimit implements java.io.Serializable {

	// Fields

	private String id;
	private String serviceId;
	private String serviceUrl;
	private String serviceName;
	private Integer limitNum;
	private String limitType;
	private String state;
	private Integer limitTime;

	// Constructors

	/** default constructor */
	public GatewayUrlLimit() {
	}

	/** minimal constructor */
	public GatewayUrlLimit(String serviceId) {
		this.serviceId = serviceId;
	}

	/** full constructor */
	public GatewayUrlLimit(String serviceId, String serviceUrl,
			String serviceName, Integer limitNum, String limitType,
			String state, Integer limitTime) {
		this.serviceId = serviceId;
		this.serviceUrl = serviceUrl;
		this.serviceName = serviceName;
		this.limitNum = limitNum;
		this.limitType = limitType;
		this.state = state;
		this.limitTime = limitTime;
	}

	// Property accessors
	@GenericGenerator(name = "generator", strategy = "uuid.hex")
	@Id
	@GeneratedValue(generator = "generator")
	@Column(name = "id", unique = true, nullable = false, length = 32)
	public String getId() {
		return this.id;
	}

	public void setId(String id) {
		this.id = id;
	}

	@Column(name = "service_id", nullable = false, length = 32)
	public String getServiceId() {
		return this.serviceId;
	}

	public void setServiceId(String serviceId) {
		this.serviceId = serviceId;
	}

	@Column(name = "service_url", length = 500)
	public String getServiceUrl() {
		return this.serviceUrl;
	}

	public void setServiceUrl(String serviceUrl) {
		this.serviceUrl = serviceUrl;
	}

	@Column(name = "service_name")
	public String getServiceName() {
		return this.serviceName;
	}

	public void setServiceName(String serviceName) {
		this.serviceName = serviceName;
	}

	@Column(name = "limit_num")
	public Integer getLimitNum() {
		return this.limitNum;
	}

	public void setLimitNum(Integer limitNum) {
		this.limitNum = limitNum;
	}

	@Column(name = "limit_type", length = 2)
	public String getLimitType() {
		return this.limitType;
	}

	public void setLimitType(String limitType) {
		this.limitType = limitType;
	}

	@Column(name = "state", length = 2)
	public String getState() {
		return this.state;
	}

	public void setState(String state) {
		this.state = state;
	}

	@Column(name = "limit_time")
	public Integer getLimitTime() {
		return this.limitTime;
	}

	public void setLimitTime(Integer limitTime) {
		this.limitTime = limitTime;
	}

}